/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.pig4cloud.pigx.wallet.entity;


import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.pig4cloud.pigx.common.customize.utils.serializer.BigDecimalToPlainStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 币种列表
 *
 * @since 2022-08-16 15:25:53
 */
@Data
@TableName("currency")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "币种列表")
public class Currency extends Model<Currency> {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键ID
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "主键ID")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;

	/**
	 * 创建人
	 */
	@ApiModelProperty(value = "创建人")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long createBy;

	/**
	 * 修改人
	 */
	@ApiModelProperty(value = "修改人")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long updateBy;

	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间")
	private LocalDateTime createTime;

	/**
	 * 修改时间
	 */
	@ApiModelProperty(value = "修改时间")
	private LocalDateTime updateTime;

	/**
	 * 逻辑删除
	 */
	@ApiModelProperty(value = "逻辑删除")
	@TableLogic
	private String delFlag;

	/**
	 * 状态（1：开启，2：禁用）
	 */
	@ApiModelProperty(value = "状态（1：开启，2：禁用）")
	private String state;

	/**
	 * 币种名称
	 */
	@ApiModelProperty(value = "币种名称")
	private String name;

	/**
	 * logo
	 */
	@ApiModelProperty(value = "logo")
	@TableField(updateStrategy = FieldStrategy.IGNORED)
	private String logo;

	/**
	 * 精度
	 */
	@ApiModelProperty(value = "精度")
	private String accuracy;

	/**
	 * 公链
	 */
	@ApiModelProperty(value = "公链")
	private String publicChain;

	/**
	 * 手续费地址
	 */
	@ApiModelProperty(value = "手续费地址")
	private String serviceChargeAddress;

	/**
	 * 手续费私钥
	 */
	@ApiModelProperty(value = "手续费私钥")
	private String serviceChargePrivateKey;

	/**
	 * 手续费
	 */
	@ApiModelProperty(value = "手续费")
	private String serviceCharge;

	/**
	 * 最小充值金额
	 */
	@ApiModelProperty(value = "最小充值金额")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal minimumRechargeAmount;

	/**
	 * 最小提现金额
	 */
	@ApiModelProperty(value = "最小提现金额")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal minimumWithdrawalAmount;

	/**
	 * 单日最大提现金额
	 */
	@ApiModelProperty(value = "单日最大提现金额")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal maximumWithdrawalAmountPerDay;

	/**
	 * 充值区块确认数
	 */
	@ApiModelProperty(value = "充值区块确认数")
	private String confirmationBlockRechargeNumber;

	/**
	 * 节点地址
	 */
	@ApiModelProperty(value = "节点地址")
	private String nodeAddress;

	/**
	 * 智能合约地址
	 */
	@ApiModelProperty(value = "智能合约地址")
	private String smartContractAddress;

	@TableField(exist = false)
	private String address;

	@ApiModelProperty(value = "apikey")
	private String apiKey;

}
